{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\jp18390\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\Age Discrimination Project\Organizational Justice_Factor Scores 2010-2019\FEVS_2015.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}17 Jun 2021, 23:10:23

{com}. import delimited "C:\Users\jp18390\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\FEVS\FEVS_2010-2019\evs2015_PRDF.csv"
{res}{text}(99 vars, 421,748 obs)

{com}. svyset [pweight=postwt]

      {txt}pweight:{col 16}{res}postwt
          {txt}VCE:{col 16}{res}linearized
  {txt}Single unit:{col 16}{res}missing
     {txt}Strata 1:{col 16}<one>
         SU 1:{col 16}<observations>
        FPC 1:{col 16}<zero>
{p2colreset}{...}

{com}. 
. 
. 
. 
. 
. drop if q17=="X"
{txt}(18,409 observations deleted)

{com}. 
. drop if q17==""
{txt}(3,183 observations deleted)

{com}. 
. drop if q37=="X"
{txt}(18,916 observations deleted)

{com}. 
. drop if q37==""
{txt}(9,135 observations deleted)

{com}. 
. drop if q38=="X"
{txt}(17,175 observations deleted)

{com}. 
. drop if q38==""
{txt}(3,368 observations deleted)

{com}. 
. drop if q15=="X"
{txt}(3,080 observations deleted)

{com}. 
. drop if q15==""
{txt}(1,468 observations deleted)

{com}. 
. drop if q22=="X"
{txt}(12,702 observations deleted)

{com}. 
. drop if q22==""
{txt}(2,205 observations deleted)

{com}. 
. drop if q25=="X"
{txt}(7,767 observations deleted)

{com}. 
. drop if q25==""
{txt}(1,850 observations deleted)

{com}. 
. drop if q33=="X"
{txt}(6,454 observations deleted)

{com}. 
. drop if q33==""
{txt}(3,127 observations deleted)

{com}. 
. drop if q48==.
{txt}(2,492 observations deleted)

{com}. 
. drop if q49==.
{txt}(1,071 observations deleted)

{com}. 
. 
. 
. destring q17, replace
{txt}q17: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q37, replace
{txt}q37: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q38, replace
{txt}q38: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q15, replace
{txt}q15: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q22, replace
{txt}q22: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q25, replace
{txt}q25: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q33, replace
{txt}q33: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. 
. 
. svy linearized : sem (JUSTICE -> DISTRIBUTIVE, ) (JUSTICE -> PROCEDURAL, ) (JUSTICE -> INTERPERSONAL, ) (DISTRIBUTIVE -> q22, ) (DISTRIBUTIVE -> q25, ) (DISTRIBUTIVE -> q33, ) (PROCEDURAL -> q15, ) (PROCEDURAL -> q17, ) (PROCEDURAL -> q37, ) (PROCEDURAL -> q38, )(INTERPERSONAL -> q48, ) (INTERPERSONAL -> q49, ), standardized latent(JUSTICE DISTRIBUTIVE PROCEDURAL INTERPERSONAL ) nocapslatent
{txt}(running sem on estimation sample)
{res}
{txt}{col 1}Survey: Structural equation model{col 49}Number of obs{col 67}= {res}   309,346
{txt}{col 1}Number of strata{col 22}= {res}        1{txt}{col 49}Population size{col 67}={res}  1,289,906
{txt}{col 1}Number of PSUs{col 22}= {res}  309,346{txt}{col 49}Design df{col 67}= {res}   309,345

{p 0 7}{space 1}{text:( 1)}{space 1} [q22]DISTRIBUTIVE = 1{p_end}
{p 0 7}{space 1}{text:( 2)}{space 1} [q15]PROCEDURAL = 1{p_end}
{p 0 7}{space 1}{text:( 3)}{space 1} [q48]INTERPERSONAL = 1{p_end}
{p 0 7}{space 1}{text:( 4)}{space 1} [DISTRIBUTIVE]JUSTICE = 1{p_end}
{txt}{hline 20}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 21}{c |}{col 33}  Linearized
{col 1}       Standardized{col 21}{c |}      Coef.{col 33}   Std. Err.{col 45}      t{col 53}   P>|t|{col 61}     [95% Con{col 74}f. Interval]
{hline 20}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}{res}Structural         {col 21}{txt}{c |}
{space 2}{col 3}DISTRIBUTIVE     {col 21}{c |}
{space 12}JUSTICE {c |}{col 21}{res}{space 2} .8446384{col 33}{space 2} .0017954{col 44}{space 1}  470.46{col 53}{space 3}0.000{col 61}{space 4} .8411196{col 74}{space 3} .8481573
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}PROCEDURAL       {col 21}{c |}
{space 12}JUSTICE {c |}{col 21}{res}{space 2} .9849139{col 33}{space 2} .0018464{col 44}{space 1}  533.43{col 53}{space 3}0.000{col 61}{space 4}  .981295{col 74}{space 3} .9885328
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}INTERPERSONAL    {col 21}{c |}
{space 12}JUSTICE {c |}{col 21}{res}{space 2} .6910357{col 33}{space 2} .0020959{col 44}{space 1}  329.71{col 53}{space 3}0.000{col 61}{space 4} .6869278{col 74}{space 3} .6951437
{txt}{hline 20}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}{res}Measurement        {col 21}{txt}{c |}
{space 2}{col 3}q22              {col 21}{c |}
{space 7}DISTRIBUTIVE {c |}{col 21}{res}{space 2} .8454125{col 33}{space 2} .0012464{col 44}{space 1}  678.27{col 53}{space 3}0.000{col 61}{space 4} .8429695{col 74}{space 3} .8478554
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 2.303954{col 33}{space 2} .0042574{col 44}{space 1}  541.16{col 53}{space 3}0.000{col 61}{space 4}  2.29561{col 74}{space 3} 2.312299
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q25              {col 21}{c |}
{space 7}DISTRIBUTIVE {c |}{col 21}{res}{space 2} .8323101{col 33}{space 2} .0013492{col 44}{space 1}  616.87{col 53}{space 3}0.000{col 61}{space 4} .8296656{col 74}{space 3} .8349546
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 2.414664{col 33}{space 2} .0046937{col 44}{space 1}  514.45{col 53}{space 3}0.000{col 61}{space 4} 2.405465{col 74}{space 3} 2.423864
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q33              {col 21}{c |}
{space 7}DISTRIBUTIVE {c |}{col 21}{res}{space 2} .7140751{col 33}{space 2} .0017519{col 44}{space 1}  407.60{col 53}{space 3}0.000{col 61}{space 4} .7106415{col 74}{space 3} .7175087
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 2.133133{col 33}{space 2} .0035143{col 44}{space 1}  606.98{col 53}{space 3}0.000{col 61}{space 4} 2.126245{col 74}{space 3} 2.140021
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q15              {col 21}{c |}
{space 9}PROCEDURAL {c |}{col 21}{res}{space 2} .6110853{col 33}{space 2} .0024417{col 44}{space 1}  250.27{col 53}{space 3}0.000{col 61}{space 4} .6062995{col 74}{space 3}  .615871
{txt}{space 14}_cons {c |}{col 21}{res}{space 2}  3.17313{col 33}{space 2} .0081238{col 44}{space 1}  390.60{col 53}{space 3}0.000{col 61}{space 4} 3.157208{col 74}{space 3} 3.189053
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q17              {col 21}{c |}
{space 9}PROCEDURAL {c |}{col 21}{res}{space 2} .7610739{col 33}{space 2} .0017189{col 44}{space 1}  442.78{col 53}{space 3}0.000{col 61}{space 4}  .757705{col 74}{space 3} .7644428
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 2.845271{col 33}{space 2}  .006727{col 44}{space 1}  422.96{col 53}{space 3}0.000{col 61}{space 4} 2.832086{col 74}{space 3} 2.858455
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q37              {col 21}{c |}
{space 9}PROCEDURAL {c |}{col 21}{res}{space 2} .8325548{col 33}{space 2} .0014631{col 44}{space 1}  569.03{col 53}{space 3}0.000{col 61}{space 4} .8296871{col 74}{space 3} .8354224
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 2.618943{col 33}{space 2} .0056512{col 44}{space 1}  463.43{col 53}{space 3}0.000{col 61}{space 4} 2.607867{col 74}{space 3}  2.63002
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q38              {col 21}{c |}
{space 9}PROCEDURAL {c |}{col 21}{res}{space 2} .8105136{col 33}{space 2} .0015999{col 44}{space 1}  506.62{col 53}{space 3}0.000{col 61}{space 4}  .807378{col 74}{space 3} .8136493
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 3.172228{col 33}{space 2} .0081503{col 44}{space 1}  389.22{col 53}{space 3}0.000{col 61}{space 4} 3.156253{col 74}{space 3} 3.188202
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q48              {col 21}{c |}
{space 6}INTERPERSONAL {c |}{col 21}{res}{space 2} .9387048{col 33}{space 2}  .001115{col 44}{space 1}  841.92{col 53}{space 3}0.000{col 61}{space 4} .9365195{col 74}{space 3} .9408901
{txt}{space 14}_cons {c |}{col 21}{res}{space 2}  3.65803{col 33}{space 2} .0100603{col 44}{space 1}  363.61{col 53}{space 3}0.000{col 61}{space 4} 3.638313{col 74}{space 3} 3.677748
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q49              {col 21}{c |}
{space 6}INTERPERSONAL {c |}{col 21}{res}{space 2}  .915593{col 33}{space 2} .0011872{col 44}{space 1}  771.25{col 53}{space 3}0.000{col 61}{space 4} .9132662{col 74}{space 3} .9179198
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 3.991411{col 33}{space 2} .0120346{col 44}{space 1}  331.66{col 53}{space 3}0.000{col 61}{space 4} 3.967824{col 74}{space 3} 4.014999
{txt}{hline 20}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 10}var(e.q22){c |}{col 21}{res}{space 2} .2852777{col 33}{space 2} .0021075{col 61}{space 4} .2811769{col 74}{space 3} .2894384
{txt}{space 10}var(e.q25){c |}{col 21}{res}{space 2} .3072599{col 33}{space 2}  .002246{col 61}{space 4} .3028892{col 74}{space 3} .3116936
{txt}{space 10}var(e.q33){c |}{col 21}{res}{space 2} .4900968{col 33}{space 2}  .002502{col 61}{space 4} .4852175{col 74}{space 3} .4950251
{txt}{space 10}var(e.q15){c |}{col 21}{res}{space 2} .6265748{col 33}{space 2} .0029842{col 61}{space 4}  .620753{col 74}{space 3} .6324512
{txt}{space 10}var(e.q17){c |}{col 21}{res}{space 2} .4207665{col 33}{space 2} .0026163{col 61}{space 4} .4156697{col 74}{space 3} .4259259
{txt}{space 10}var(e.q37){c |}{col 21}{res}{space 2} .3068526{col 33}{space 2} .0024362{col 61}{space 4} .3021146{col 74}{space 3} .3116649
{txt}{space 10}var(e.q38){c |}{col 21}{res}{space 2} .3430676{col 33}{space 2} .0025934{col 61}{space 4} .3380221{col 74}{space 3} .3481885
{txt}{space 10}var(e.q48){c |}{col 21}{res}{space 2} .1188332{col 33}{space 2} .0020932{col 61}{space 4} .1148006{col 74}{space 3} .1230076
{txt}{space 10}var(e.q49){c |}{col 21}{res}{space 2} .1616895{col 33}{space 2} .0021739{col 61}{space 4} .1574843{col 74}{space 3} .1660069
{txt}{space 1}var(e.DISTRIBUTIVE){c |}{col 21}{res}{space 2} .2865859{col 33}{space 2} .0030329{col 61}{space 4} .2807028{col 74}{space 3} .2925923
{txt}{space 3}var(e.PROCEDURAL){c |}{col 21}{res}{space 2} .0299446{col 33}{space 2} .0036371{col 61}{space 4} .0236011{col 74}{space 3} .0379932
{txt}var(e.INTERPERSONAL){c |}{col 21}{res}{space 2} .5224696{col 33}{space 2} .0028967{col 61}{space 4} .5168229{col 74}{space 3}  .528178
{txt}{space 8}var(JUSTICE){c |}{col 21}{res}{space 2}        1{col 33}{space 2}        .{col 61}{space 4}        .{col 74}{space 3}        .
{txt}{hline 20}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. 
. 
. 
. estat gof, stats(all)
{res}
{txt}{hline 21}{c TT}{hline 54}
{lalign 21:Fit statistic}{c |}      Value   Description
{hline 21}{c +}{hline 54}
{lalign 21:Size of residuals}{c |}
{ralign 20:SRMR} {c |} {res}{ralign 10:     0.040}{txt}   Standardized root mean squared residual
{ralign 20:CD} {c |} {res}{ralign 10:     0.973}{txt}   Coefficient of determination
{hline 21}{c BT}{hline 54}
{p 0 2 2 75}Note: model was fit with{txt} svy: prefix; only stats(residuals) valid.{p_end}

{com}. predict justice, latent(JUSTICE)
{res}
{com}. 
. 
. 
. egen average_justice = mean (justice), by (agency)

. 
. 
. 
. egen sub1_average_justice = mean (justice), by (plevel1)

. 
. 
. 
. egen sub2_average_justice = mean (justice), by (plevel2)

. save "C:\Users\jp18390\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\Age Discrimination Project\Organizational Justice_Factor Scores 2010-2019\2015FEVS_Justice.dta"
{txt}file C:\Users\jp18390\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\Age Discrimination Project\Organizational Justice_Factor Scores 2010-2019\2015FEVS_Justice.dta saved

{com}. exit, clear
